package com.ruoyi.common.utils;

import java.util.Random;
import java.util.UUID;

/**
 * @author 史彦磊
 * @create 2018-02-05 14:22.
 */
public class UUIDUtil {


    public static String getUUID() {
        UUID uuid = UUID.randomUUID();
        return uuid.toString().replace("-", "");
    }


    public static String randomEmailCode(){
        StringBuilder str = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < 6; i++) {
            str.append(random.nextInt(10));
        }
        return str.toString();
    }
}
